/**
 *       Copyright (c) 2012 Lukas Zaruba
 *
 *   This file is part of Robot Playground.
 *
 *   Robot Playground is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   Robot Playground is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public License
 *   along with Robot Playground. If not, see <http://www.gnu.org/licenses/>.
 */
package net.zarubsys.robotplayground.gui.session.providers;

import net.zarubsys.robotplayground.core.session.Session;

/**
 * ISystemObjectChangeNotifier
 * 
 * Implement this interface if you want to provide feedback about
 * the change of underlying resources of your object.
 * 
 * Example: Program is represented by a file. You want the session to 
 * be revalidated every time the program files changes. You will take care about
 * the file monitoring.
 *
 * @author Lukas Zaruba, lukas.zaruba@gmail.com
 */
public interface ISystemObjectChangeNotifier {
	
	/**
	 * This method is invoked once the object is added to the session or the session is reloaded
	 * @param listener which should be notified once the change occurs
	 * @param session to which the changes are associated
	 * @param index of the object in its class
	 * @return value is not yet used, return true
	 */
	boolean registerListener(ISystemObjectChangeListener listener, Session session, int index);

}

